﻿@{
    ViewBag.Title = "网站设置";
}
@using MvcApplication.Entity
@model List<DisplayMenu>
<input type="hidden" id="menu_data" value="@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(Model))"/>
<script src="~/Content/SiteInfo/Menu.js"></script>
<div class="am-cf am-padding">
    <div class="am-fl am-cf">
        <strong class="am-text-primary am-text-lg">设置</strong> / 
        <small>菜单</small>
    </div>
</div>
<div class="am-g" ms-controller="menu">
    <div class="am-u-sm-4">
        <section data-am-widget="accordion" class="am-accordion am-accordion-gapped" data-am-accordion='{  }'>
            <dl class="am-accordion-item am-active">
                <dt class="am-accordion-title">自定义</dt>
                <dd class="am-accordion-bd am-collapse am-in">
                    <!-- 规避 Collapase 处理有 padding 的折叠内容计算计算有误问题， 加一个容器 -->
                    <div class="am-accordion-content">
                        <form class="am-form">
                            <div class="am-form-group am-form-icon am-form-feedback">
                                <label class="am-form-label">菜单名</label>
                                <input type="text" class="" ms-duplex="new_custom_menu.Name">
                                @*<span class="am-icon-check"></span>*@
                            </div>
                            <div class="am-form-group">
                                <label class="am-form-label">链接</label>
                                <input type="text" class="am-form-field" ms-duplex="new_custom_menu.Link">
                            </div>
                            <div style="text-align: right">
                                <button type="button" class="am-btn am-btn-primary" ms-click="create_menu">添加菜单</button>
                            </div>
                        </form>
                    </div>
                </dd>
            </dl>
            @*<dl class="am-accordion-item">
                <dt class="am-accordion-title">页面</dt>
                <dd class="am-accordion-bd am-collapse ">
                    <!-- 规避 Collapase 处理有 padding 的折叠内容计算计算有误问题， 加一个容器 -->
                    <div class="am-accordion-content">
                        走在忠孝东路
                                <br />
                        徘徊在茫然中
                                <br />
                        在我的人生旅途
                                <br />
                        选择了多少错误
                                <br />
                        我在睡梦中惊醒
                                <br />
                        感叹悔言无尽
                                <br />
                        恨我不能说服自己
                                <br />
                        接受一切教训
                                <br />
                        让生命去等候
                                <br />
                        等候下一个漂流
                                <br />
                        让生命去等候
                                <br />
                        等候下一个伤口
                    </div>
                </dd>
            </dl>*@
        </section>
    </div>
    <div class="am-u-sm-4">
        <div data-am-widget="list_news" class="am-list-news am-list-news-default" style="margin-top: -15px;">
            <!--列表标题-->
            <div class="am-list-news-hd am-cf">
                <!--带更多链接-->
                <span href="##" class="">
                    <h2>菜单列表</h2>
                </span>
            </div>

            <div class="am-list-news-bd">
                <ul class="am-list">
                    <li class="am-g am-list-item-dated" ms-repeat="menus">
                        <a href="##" class="am-list-item-hd" ms-click="edit_menu(el)">{{el.Name}}</a>
                        <span class="am-list-date">2013-09-18</span>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <div class="am-u-sm-4">
        <section data-am-widget="accordion" class="am-accordion am-accordion-gapped" data-am-accordion='{  }' ms-if="be_edit_menu!=null">
            <dl class="am-accordion-item am-active">
                <dt class="am-accordion-title">菜单信息</dt>
                <dd class="am-accordion-bd am-collapse am-in">
                    <!-- 规避 Collapase 处理有 padding 的折叠内容计算计算有误问题， 加一个容器 -->
                    <div class="am-accordion-content">
                        <form class="am-form">
                            <div class="am-form-group am-form-icon am-form-feedback">
                                <label class="am-form-label">菜单名</label>
                                <input type="text" class="" ms-duplex="be_edit_menu.Name">
                                @*<span class="am-icon-check"></span>*@
                            </div>
                            <div class="am-form-group">
                                <label class="am-form-label">链接</label>
                                <input type="text" class="am-form-field" ms-duplex="be_edit_menu.Link">
                            </div>
                            <div style="text-align: right">
                                <button type="button" class="am-btn am-btn-primary" ms-click="save_menu()">保存菜单</button>
                                <button type="button" class="am-btn am-btn-danger" ms-click="remove_menu()">删除菜单</button>
                            </div>
                        </form>
                    </div>
                </dd>
            </dl>
        </section>
    </div>

</div>
